<?php
/**
 * Commentaire
 * 
 * @author Chadi
 * @version 
 */
require_once 'Zend/Db/Table/Abstract.php';
class Application_Model_DbTable_Commentaire extends Zend_Db_Table_Abstract
{
    /**
     * The default table name 
     */
    protected $_name = 'commentaire';
    
function addCommentaire ($id_fiche_test, $date,$commentaire)
    {
        $data = array("id_fiche_test" => $id_fiche_test, "date" => $date, "commentaire" => $commentaire);
        $this->insert($data);
    }
    
public function getCommentaire($id)
	{
		$db = Zend_Db_Table::getDefaultAdapter();
		$select = $db->select()
             ->from('commentaire',array('*'))
             ->where('id_fiche_test = ?',$id);
	
		$result = $db->fetchAll($select);
		//print_r($result);
    	//die();
    	return $result;
}
}
